#include <cstdlib>

class Program {
public:
    void myMethod() {
        // Do something
    }
};

int main(int argc, char* argv[]) {
    int a;  // Stack: automatic variable
    Program* p;  // Stack: automatic pointer-variable

    p = new Program();  // Heap: Object of class Program

    p->myMethod();  // Stack: return-adress to main()-method.

    delete p;

    return EXIT_SUCCESS;
}
